<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>我的收入</title>
		<script language="javascript">
		function firm(){
			if(confirm("你确定删除该收入记录吗?")){
				event.returnValue=true;
			}else{
				event.returnValue=false;
			}

		}
		</script>
		<link rel="stylesheet" type="text/css" href='<s:url value="/styles.css" />'>
	</head>
	<body>
		<s:include value="/header.jsp" />
		<s:if test="#session['user'] != null">
			<div class="divNavigatorOuterFrame">
				<div class="divNavigatorInnerFrame" style="text-align: right;">
					欢迎<s:property value="#session['user'].name" />&nbsp;&nbsp;
				</div>
			</div>
			<div class="divWhiteLine"></div>
		</s:if>		
		<s:if test="myIncomes.isEmpty() == true">目前您没有任何收入项!</s:if >
		<s:else>
			<table>
				<tr>
					<td colspan="8" style="height: 5px"></td>
				</tr>
				<tr>
					<td colspan="8" class="tdHeader">我的收入:</td>
				</tr>
				<tr>
					<td colspan="8" style="height: 5px"></td>
				</tr>
				<tr>
					<td class="tdListHeader">ID</td>
					<td class="tdListHeader">进账时间</td>
					<td class="tdListHeader">工资</td>
					<td class="tdListHeader">报销</td>
					<td class="tdListHeader">其他</td>
					<td class="tdListHeader">合计</td>
					<td class="tdListHeader">修改</td>
					<td class="tdListHeader">删除</td>
				</tr>
				<s:iterator value="myIncomes">
					<s:set var="sId" value="id" />
					<tr>
						<td><s:property value="id" /></td>
						<td><s:date name="incomedate" format="yyyy/MM/dd"/></td>
						<td><s:property value="wage" /></td>
						<td><s:property value="expenseacc" /></td>
						<td><s:property value="others" /></td>
						<td bgcolor="red"><s:property value="total" /></td>
						<td><a href='<s:url value="IncomeAction_editIncome"><s:param name="sId" value="#sId"/></s:url>' class="aList">修改</a></td>
						<td><a href='<s:url value="IncomeAction_deleteIncome"><s:param name="sId" value="#sId" /></s:url>' class="aList" onclick="firm()">删除</a></td>
					</tr>
				</s:iterator>
				<s:if test="totalDc == null"></s:if >
				<s:else>
					<tr>
						<td colspan="2" class="tdListHeader">合计</td>
						<s:iterator value="totalDc" status="stts">
							<td bgcolor="red"><s:property value="totalDc[#stts.index]" /></td>
						</s:iterator>
			
				</tr>
				</s:else>				
			</table>
		</s:else>
	</body>
</html>